<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <!--v-model双向绑定,变量会影响页面的改变,页面也会影响变量-->
    <input type="text" v-model="msg">
    {{msg}}
    <h1>注册界面</h1>
    用户名:<input type="text" placeholder="请输入用户名" v-model="user.username"><br>
    密码:<input type="password" placeholder="请输入密码" v-model="user.password"><br>
    <input type="button" value="登陆">
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el: "body>div",
        data: {
            msg: "双向绑定测试",
            user:{
                username:"",
                password:""
            }
        }
    })
</script>
</body>
</html>